<?php echo $doctype; ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>LuckyLine</title>
	<meta name="viewport" content="width=device-width, user-scalable=0" />
	<?php echo $meta_charset."\n"; ?>
	<?php echo $link."\n"; ?>
	<?php echo $jqueryjs."\n"; ?>
	<?php echo $commonjs."\n"; ?>
	<script>
	$.ajax({
		url: '<?php echo base_url(); ?>/wap/countnum',
		type: 'post',
		dataType: 'text',
		cache: false,
		success: function (text) {
			$('#countnum').html(parseInt(text)+1);
		},
		error: function (text) {
			//alert(text.responseText);
			//$('#list').html('系统错误');
		}
	});
	
	function save(){
		$.ajax({
			url: '<?php echo base_url(); ?>/wap/save',
			type: 'post',
			dataType: 'text',
			data: 'openid=1&status=sina&content='+$('#content').val()+'&pic='+$('input[name="pic"]:checked').val(),
			cache: false,
			success: function (text) {
				if(text=='0'){
					location='/wap/end';
				}else{
					alert('数据提交失败，请稍后再试!');
				}
			},
			error: function (text) {
				//alert(text.responseText);
				//$('#list').html('系统错误');
			}
		});
	}
	
	function sel(vals){
		//alert(vals);
		//$('input[name="pic"]').removeAttr('checked');
		$('input[name="pic"][value='+vals+']').prop('checked',true);
	}
	</script>
</head>
<body>
<div class="back">
	<div class="namebox"><img src="/images/wap/bar.png" border="0" width="241" height="48"></div>
	<div class="picbox">
		<ul>
			<li class="pic"><img src="/images/wap/pic0-1.png" border="0" width="117" height="116" onclick="sel(1);"></li>
			<li class="pic"><img src="/images/wap/pic1-1.png" border="0" width="117" height="116" onclick="sel(2);"></li>
			<li class="pic"><img src="/images/wap/pic2-1.png" border="0" width="117" height="116" onclick="sel(3);"></li>
			<li class="pic"><img src="/images/wap/pic3-1.png" border="0" width="117" height="116" onclick="sel(4);"></li>
			<li class="input"><input type="radio" name="pic" value="1" checked></li>
			<li class="input"><input type="radio" name="pic" value="2"></li>
			<li class="input"><input type="radio" name="pic" value="3"></li>
			<li class="input"><input type="radio" name="pic" value="4"></li>
		</ul>
	</div>
	<div class="inputbox">
		<div class="count">
			<ul>
				<li class="txt">您排在</li>
				<li class="input" id="countnum"></li>
				<li class="txt">位</li>
			</ul>
		</div>
		<div class="pub">
			<textarea id="content" name="content" style="width:520px;height:235px;margin:10px 0 0 38px;border:0;"></textarea>
		</div>
		<div class="bt">
			<ul>
				<li><img src="/images/wap/pub.png" width="171" height="73" onclick="save();" /></li>
				<li><img src="/images/wap/cancel.png" width="171" height="73" onclick="location='/wap'" /></li>
			</ul>
		</div>
	</div>
</div>
</body>
</html>

